package com.yfp.client.service.impl;

import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yfp.client.domain.MallOrderDetails;
import com.yfp.client.mapper.MallOrderDetailsMapper;
import com.yfp.client.service.MallOrderDetailsService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *
 * @description 针对表【mall_order_details】的数据库操作Service实现
 * @createDate 2025-03-05 10:54:48
 */
@Service
public class MallOrderDetailsServiceImpl extends ServiceImpl<MallOrderDetailsMapper, MallOrderDetails> implements MallOrderDetailsService {

    @Resource
    private MallOrderDetailsMapper mallOrderDetailsMapper;

    @Override
    public List<MallOrderDetails> listByMallOrderId(Long mallOrderId) {
        return mallOrderDetailsMapper.listByMallOrderId(mallOrderId);
    }

    @Override
    public List<MallOrderDetails> listByMallOrderIds(List<Long> mallOrderIds) {
        if (CollUtil.isEmpty(mallOrderIds)){
            return List.of();
        }

        return mallOrderDetailsMapper.listByMallOrderIds(mallOrderIds);
    }
}




